package com.yupi.project.service;

import com.yupi.yuapicommon.model.dto.user.UserLoginRequest;
import com.yupi.yuapicommon.model.entity.User;
import com.yupi.yuapicommon.model.vo.UserVO;
import com.yupi.yuapicommon.model.vo.req.EmailMsgRequest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public interface MailService {
    /**
     * 给前端输入的邮箱，发送验证码
     * @param email
     * @return
     */
    boolean sendMimeMail(String email);


    /**
     * 检验验证码是否一致
     * @return
     */
    User registered(UserLoginRequest userLoginRequest, HttpServletRequest request);

    /**
     * 通过输入email查询password，然后比较两个password，如果一样，登录成功
     * @param email
     * @param password
     * @return
     */
    User loginIn(String email, String password, HttpServletRequest request);

    /**
     * 检验验证码是否一致
     * @param userEmail
     * @param code
     * @return
     */
    boolean verifyCode(String userEmail, String code, HttpServletRequest request);

    String sendMsg(EmailMsgRequest emailMsgRequest);
}
